package com.bringway.framework.domain;

import org.apache.commons.lang3.StringUtils;

public class TreeNodeCode{
	private String id;

	private String parentId; // 父节点id

	private String text;//菜单名字

	private boolean expanded;

	private boolean disabled;

	private String icon;

	private String cls;

	private String iconCls;
	
	private boolean async;

	private boolean isLeaf;
	
	private String childct;
	
	private String alias;//别名
	
	private String value;//属性值
	
	private String index;//排序序号
	
	private String comment;//功能描述
	

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public boolean isExpanded() {
		return expanded;
	}

	public void setExpanded(boolean expanded) {
		this.expanded = expanded;
	}

	public boolean isDisabled() {
		return disabled;
	}

	public void setDisabled(boolean disabled) {
		this.disabled = disabled;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getCls() {
		return cls;
	}

	public void setCls(String cls) {
		this.cls = cls;
	}

	public String getIconCls() {
		return iconCls;
	}

	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}

	public boolean isAsync() {
		return async;
	}

	public void setAsync(boolean async) {
		this.async = async;
	}

	public boolean isLeaf() {
		return isLeaf;
	}

	public void setIsLeaf(boolean isLeaf) {
		this.isLeaf = isLeaf;
	}

	public String getChildct() {
		return childct;
	}

	public void setChildct(String childct) {
		this.childct = childct;
		if(StringUtils.isNotEmpty(this.childct)){
			int num = Integer.parseInt(this.childct);
			if(num > 0){
				this.setIsLeaf(false);
			}else{
				this.setIsLeaf(true);
			}
		}
	}

	public void setLeaf(boolean isLeaf) {
		this.isLeaf = isLeaf;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	
	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getIndex() {
		return index;
	}

	public void setIndex(String index) {
		this.index = index;
	}





}
